<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app" content="后盾人" color="red">houdunwang.com</div>

    <input type="number" name="age" value="88" />
    <script>
        //DOM属性中记录标准属性，特征中记录标准和定制属性
        //使用特征操作时属性名称不区分大小写
        //特征值都为字符串类型
        const app = document.querySelector('#app')
  for (const { name, value } of app.attributes) {
    console.log(name, value)
  }
  //id app 
  //content 后盾人
  //color red
  //属性值都为字符串
  let inputs=document.querySelector('[name="age"]');
let numbers= parseInt (inputs.getAttribute("value"))+100;
console.log(numbers);
//setAttribute 设置属性
inputs.setAttribute("value",numbers);

//删除属性
inputs.removeAttribute("value");
//检测还有没有value属性
console.log(inputs.hasAttribute("value"));//删除就为fasle
console.log(inputs.getAttribute("value"));//null
    </script>
</body>
</html>